//
//  SSOrderTableViewCell.swift
//  拾舍清洁
//
//  Created by sky.wei on 2023/3/5.
//

import UIKit

class SSOrderTableViewCell: UITableViewCell {
    @IBOutlet weak var name: UILabel!
    
    @IBOutlet weak var imageV: UIImageView!
    
    @IBOutlet weak var priceLab: UILabel!
    @IBOutlet weak var timeLab: UILabel!
    
    @IBOutlet weak var serviceBtn: UIButton!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        selectionStyle = .none
        serviceBtn.layer.borderColor = UIColor.init(hex: "#0052D9")?.cgColor
        serviceBtn.layer.borderWidth = 1
        serviceBtn.layer.cornerRadius = 12
        serviceBtn.layer.masksToBounds = true
//        serviceBtn.backgroundColor = UIColor.red
        
        imageV.layer.cornerRadius = 6
        imageV.layer.masksToBounds = true
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    func setData(order:SSOrder) {
        name.text = order.itemNames
        priceLab.text = "总计：$\(order.total)"
        timeLab.text = order.serviceTime
    }
    
    @IBAction func contactService(_ sender: Any) {
//        let vc = SSQRCodeViewController.init(nibName: "SSQRCodeViewController", bundle: nil)
//        UIViewController.current().present(vc, animated: true)
        enterMeiqia()
    }
}
